<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Graphes  - Algorithmes de parcours  -: Référence de la classe tp2::Couverture</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Graphes  - Algorithmes de parcours  -
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Généré par Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="namespaces.html"><span>Espaces&#160;de&#160;nommage</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Fichiers</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Liste&#160;des&#160;classes</span></a></li>
      <li><a href="inherits.html"><span>Hiérarchie&#160;des&#160;classes</span></a></li>
      <li><a href="functions.html"><span>Membres&#160;de&#160;classe</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacetp2.html">tp2</a></li><li class="navelem"><a class="el" href="classtp2_1_1_couverture.html">Couverture</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Fonctions membres publiques</a> &#124;
<a href="#pri-attribs">Attributs privés</a> &#124;
<a href="classtp2_1_1_couverture-members.html">Liste de tous les membres</a>  </div>
  <div class="headertitle">
<div class="title">Référence de la classe tp2::Couverture</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_couverture_8h_source.html">Couverture.h</a>&gt;</code></p>
<div class="dynheader">
Graphe de collaboration de tp2::Couverture:</div>
<div class="dyncontent">
<div class="center"><img src="classtp2_1_1_couverture__coll__graph.png" border="0" usemap="#tp2_1_1_couverture_coll__map" alt="Collaboration graph"/></div>
<map name="tp2_1_1_couverture_coll__map" id="tp2_1_1_couverture_coll__map">
<area shape="rect" id="node2" href="class_graphe.html" title="Graphe\&lt; Ville \&gt;" alt="" coords="5,113,117,139"/><area shape="rect" id="node4" href="class_graphe_1_1_sommet.html" title="Classe représentant un sommet dans un graphe." alt="" coords="73,14,252,41"/><area shape="rect" id="node6" href="class_graphe_1_1_arc.html" title="Classe interne représentant un arc entre deux sommets dans le graphe." alt="" coords="152,113,301,139"/></map>
<center><span class="legend">[<a href="graph_legend.html">légende</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Fonctions membres publiques</h2></td></tr>
<tr class="memitem:a09d50ea815624aca22ff92847c76318d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtp2_1_1_couverture.html#a09d50ea815624aca22ff92847c76318d">Couverture</a> (std::ifstream &amp;p_fichierEntree)</td></tr>
<tr class="memdesc:a09d50ea815624aca22ff92847c76318d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructeur ï¿½ partir d'un fichier en entrï¿½e.  <a href="#a09d50ea815624aca22ff92847c76318d">Plus de détails...</a><br/></td></tr>
<tr class="separator:a09d50ea815624aca22ff92847c76318d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab44fd26653a453788273c51c2d22bb69"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtp2_1_1_couverture.html#ab44fd26653a453788273c51c2d22bb69">~Couverture</a> ()</td></tr>
<tr class="separator:ab44fd26653a453788273c51c2d22bb69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2404ee49646bff274f688da3e9432fd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtp2_1_1_couverture.html#ad2404ee49646bff274f688da3e9432fd">afficherVilles</a> (std::vector&lt; <a class="el" href="classtp2_1_1_ville.html">Ville</a> &gt; &amp;p_vVilles)</td></tr>
<tr class="memdesc:ad2404ee49646bff274f688da3e9432fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Affiche une liste de villes de la couverture ï¿½ l'ï¿½cran.  <a href="#ad2404ee49646bff274f688da3e9432fd">Plus de détails...</a><br/></td></tr>
<tr class="separator:ad2404ee49646bff274f688da3e9432fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35cd466b6de9645503f1f9990737fba8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtp2_1_1_couverture.html#a35cd466b6de9645503f1f9990737fba8">afficherVilles</a> ()</td></tr>
<tr class="memdesc:a35cd466b6de9645503f1f9990737fba8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Affiche une liste de villes de la couverture ï¿½ l'ï¿½cran.  <a href="#a35cd466b6de9645503f1f9990737fba8">Plus de détails...</a><br/></td></tr>
<tr class="separator:a35cd466b6de9645503f1f9990737fba8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5833a97dda1028931023acc524bb3a2d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtp2_1_1_couverture.html#a5833a97dda1028931023acc524bb3a2d">villesAccessibles</a> ()</td></tr>
<tr class="separator:a5833a97dda1028931023acc524bb3a2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab581fbf5e7bc482776425510704602da"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classtp2_1_1_ville.html">Ville</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtp2_1_1_couverture.html#ab581fbf5e7bc482776425510704602da">villesCritiques</a> ()</td></tr>
<tr class="separator:ab581fbf5e7bc482776425510704602da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae02fdb4ef4c726327740e8343ba8b5fa"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classtp2_1_1_ville.html">Ville</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtp2_1_1_couverture.html#ae02fdb4ef4c726327740e8343ba8b5fa">determinerMinParcours</a> (const <a class="el" href="classtp2_1_1_ville.html">Ville</a> &amp;p_origine, const <a class="el" href="classtp2_1_1_ville.html">Ville</a> &amp;p_destination, int &amp;p_duree)</td></tr>
<tr class="separator:ae02fdb4ef4c726327740e8343ba8b5fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a481481ff956f48499849d9954b61b643"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classtp2_1_1_ville.html">Ville</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtp2_1_1_couverture.html#a481481ff956f48499849d9954b61b643">bellManFord</a> (const <a class="el" href="classtp2_1_1_ville.html">Ville</a> &amp;p_origine, const <a class="el" href="classtp2_1_1_ville.html">Ville</a> &amp;p_destination, int &amp;p_duree)</td></tr>
<tr class="separator:a481481ff956f48499849d9954b61b643"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Attributs privés</h2></td></tr>
<tr class="memitem:a6a620a08b2a810862999c0059c87408e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtp2_1_1_graphe.html">Graphe</a>&lt; <a class="el" href="classtp2_1_1_ville.html">Ville</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a></td></tr>
<tr class="separator:a6a620a08b2a810862999c0059c87408e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description détaillée</h2>
<div class="textblock">
<p>Définition à la ligne <a class="el" href="_couverture_8h_source.html#l00022">22</a> du fichier <a class="el" href="_couverture_8h_source.html">Couverture.h</a>.</p>
</div><h2 class="groupheader">Documentation des constructeurs et destructeur</h2>
<a class="anchor" id="a09d50ea815624aca22ff92847c76318d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tp2::Couverture::Couverture </td>
          <td>(</td>
          <td class="paramtype">std::ifstream &amp;&#160;</td>
          <td class="paramname"><em>p_fichierEntree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructeur ï¿½ partir d'un fichier en entrï¿½e. </p>
<dl class="params"><dt>Paramètres</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_fichierEntree</td><td>pointeur sur le fichier contenant la liste des villes ï¿½ charger ainsi que les liaisons. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Précondition</dt><dd>Il y a assez de mï¿½moire pour charger toutes les ville de la liste. </dd>
<dd>
Le fichier <em>fichierEntree</em> est ouvert corectement. </dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>Le fichier <em>fichierEntree</em> n'est pas fermï¿½ par la fonction. </dd>
<dd>
Si les prï¿½conditions sont respectï¿½es, les donnï¿½es de la couverture contenues dans le fichier en entrï¿½e sont organisï¿½es dans un graphe en mï¿½moire. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">bad_alloc</td><td>si pas assez de mï¿½moire contenir toute la liste du fichier. </td></tr>
    <tr><td class="paramname">logic_error</td><td>si le fichier <em>fichierEntree</em> n'est pas ouvert correctement. </td></tr>
  </table>
  </dd>
</dl>

<p>Définition à la ligne <a class="el" href="_couverture_8cpp_source.html#l00027">27</a> du fichier <a class="el" href="_couverture_8cpp_source.html">Couverture.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;{</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="keywordflow">if</span> (p_fichierEntree == NULL)</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">&quot;Couverture: fichier non ouvert\n&quot;</span>);</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="comment">//Lecture des donnï¿½es sur les villes</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordtype">string</span> nom; <span class="comment">//Pour le nom des villes</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keywordtype">string</span> codeAeroport;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordtype">int</span> numero = 1;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    vector&lt;string&gt; tabNomVilles;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keywordtype">bool</span> sentinelle = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordflow">while</span> (!p_fichierEntree.eof() &amp;&amp; sentinelle == <span class="keyword">false</span>)</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    {</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        getline(p_fichierEntree, nom);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordflow">if</span> (nom == <span class="stringliteral">&quot;$&quot;</span>) <span class="comment">//limite de la premiï¿½re partie du fichier</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        {</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            sentinelle = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        }</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        {</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            getline(p_fichierEntree, codeAeroport);</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;            <a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.ajouterSommet(numero, Ville(nom, codeAeroport));</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;            ++numero;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            tabNomVilles.push_back(nom);</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        }</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    }</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordtype">int</span> dureeVol;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordtype">string</span> villeDestination; <span class="comment">//nom de la ville de destination</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">int</span> indiceSource;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordtype">int</span> indiceDestination;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">char</span> buff[255];</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    vector&lt;string&gt;::iterator position;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordflow">while</span> (!p_fichierEntree.eof())</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    {</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        p_fichierEntree.getline(buff, 100);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        nom = buff;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        position = find(tabNomVilles.begin(), tabNomVilles.end(), nom);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        indiceSource = position - tabNomVilles.begin();</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        p_fichierEntree.getline(buff, 100);</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        villeDestination = buff;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        position = find(tabNomVilles.begin(), tabNomVilles.end(),</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                villeDestination);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        indiceDestination = position - tabNomVilles.begin();</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        p_fichierEntree &gt;&gt; dureeVol;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        p_fichierEntree.ignore();</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.ajouterArc(indiceSource + 1, indiceDestination + 1, dureeVol);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    }</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="comment">//  cout &lt;&lt; m_graphe;</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;}</div>
<div class="ttc" id="classtp2_1_1_couverture_html_a6a620a08b2a810862999c0059c87408e"><div class="ttname"><a href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">tp2::Couverture::m_graphe</a></div><div class="ttdeci">Graphe&lt; Ville &gt; m_graphe</div><div class="ttdef"><b>Definition:</b> <a href="_couverture_8h_source.html#l00051">Couverture.h:51</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab44fd26653a453788273c51c2d22bb69"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tp2::Couverture::~Couverture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Définition à la ligne <a class="el" href="_couverture_8cpp_source.html#l00080">80</a> du fichier <a class="el" href="_couverture_8cpp_source.html">Couverture.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;{</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Documentation des fonctions membres</h2>
<a class="anchor" id="ad2404ee49646bff274f688da3e9432fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tp2::Couverture::afficherVilles </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; <a class="el" href="classtp2_1_1_ville.html">Ville</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>p_vVilles</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Affiche une liste de villes de la couverture ï¿½ l'ï¿½cran. </p>
<dl class="params"><dt>Paramètres</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_vVilles</td><td>Une liste de villes dans un vector. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd>Le contenu de la liste p_vVilles est affichï¿½. </dd></dl>

<p>Définition à la ligne <a class="el" href="_couverture_8cpp_source.html#l00087">87</a> du fichier <a class="el" href="_couverture_8cpp_source.html">Couverture.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;{</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keywordflow">if</span> (p_vVilles.size() == 0)</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    {</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        std::cout &lt;&lt; <span class="stringliteral">&quot;La liste est vide\n&quot;</span>;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = p_vVilles.size(); i &gt; 0; i--)</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            std::cout &lt;&lt; p_vVilles[i - 1] &lt;&lt; std::endl;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    }</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a35cd466b6de9645503f1f9990737fba8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tp2::Couverture::afficherVilles </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Affiche une liste de villes de la couverture ï¿½ l'ï¿½cran. </p>
<dl class="section post"><dt>Postcondition</dt><dd>Le contenu de la liste p_vVilles est affichï¿½. </dd></dl>

<p>Définition à la ligne <a class="el" href="_couverture_8cpp_source.html#l00104">104</a> du fichier <a class="el" href="_couverture_8cpp_source.html">Couverture.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;{</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    std::vector&lt;int&gt; nums;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    std::vector&lt;Ville&gt; villes;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    nums = <a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.listerSommets();</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; nums.size(); i++)</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        villes.push_back(<a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.getEtiquetteSommet(nums[i]));</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    }</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <a class="code" href="classtp2_1_1_couverture.html#a35cd466b6de9645503f1f9990737fba8">afficherVilles</a>(villes);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;}</div>
<div class="ttc" id="classtp2_1_1_couverture_html_a6a620a08b2a810862999c0059c87408e"><div class="ttname"><a href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">tp2::Couverture::m_graphe</a></div><div class="ttdeci">Graphe&lt; Ville &gt; m_graphe</div><div class="ttdef"><b>Definition:</b> <a href="_couverture_8h_source.html#l00051">Couverture.h:51</a></div></div>
<div class="ttc" id="classtp2_1_1_couverture_html_a35cd466b6de9645503f1f9990737fba8"><div class="ttname"><a href="classtp2_1_1_couverture.html#a35cd466b6de9645503f1f9990737fba8">tp2::Couverture::afficherVilles</a></div><div class="ttdeci">void afficherVilles()</div><div class="ttdoc">Affiche une liste de villes de la couverture ï¿½ l&amp;#39;ï¿½cran. </div><div class="ttdef"><b>Definition:</b> <a href="_couverture_8cpp_source.html#l00104">Couverture.cpp:104</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a481481ff956f48499849d9954b61b643"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classtp2_1_1_ville.html">Ville</a>&gt; tp2::Couverture::bellManFord </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classtp2_1_1_ville.html">Ville</a> &amp;&#160;</td>
          <td class="paramname"><em>p_origine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classtp2_1_1_ville.html">Ville</a> &amp;&#160;</td>
          <td class="paramname"><em>p_destination</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>p_duree</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ae02fdb4ef4c726327740e8343ba8b5fa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; <a class="el" href="classtp2_1_1_ville.html">Ville</a> &gt; tp2::Couverture::determinerMinParcours </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classtp2_1_1_ville.html">Ville</a> &amp;&#160;</td>
          <td class="paramname"><em>p_origine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classtp2_1_1_ville.html">Ville</a> &amp;&#160;</td>
          <td class="paramname"><em>p_destination</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>p_duree</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Définition à la ligne <a class="el" href="_couverture_8cpp_source.html#l00131">131</a> du fichier <a class="el" href="_couverture_8cpp_source.html">Couverture.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;{</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    std::vector&lt;Ville&gt; chemin;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    p_duree = <a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.dijkstra(p_origine, p_destination, chemin);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    p_duree += <a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.getCoutArc(<a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.getNumeroSommet(p_origine),</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            <a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.getNumeroSommet(p_destination));</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keywordflow">return</span> chemin;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;}</div>
<div class="ttc" id="classtp2_1_1_couverture_html_a6a620a08b2a810862999c0059c87408e"><div class="ttname"><a href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">tp2::Couverture::m_graphe</a></div><div class="ttdeci">Graphe&lt; Ville &gt; m_graphe</div><div class="ttdef"><b>Definition:</b> <a href="_couverture_8h_source.html#l00051">Couverture.h:51</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5833a97dda1028931023acc524bb3a2d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool tp2::Couverture::villesAccessibles </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Définition à la ligne <a class="el" href="_couverture_8cpp_source.html#l00126">126</a> du fichier <a class="el" href="_couverture_8cpp_source.html">Couverture.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;{</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.estFortementConnexe();</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;}</div>
<div class="ttc" id="classtp2_1_1_couverture_html_a6a620a08b2a810862999c0059c87408e"><div class="ttname"><a href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">tp2::Couverture::m_graphe</a></div><div class="ttdeci">Graphe&lt; Ville &gt; m_graphe</div><div class="ttdef"><b>Definition:</b> <a href="_couverture_8h_source.html#l00051">Couverture.h:51</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab581fbf5e7bc482776425510704602da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; <a class="el" href="classtp2_1_1_ville.html">Ville</a> &gt; tp2::Couverture::villesCritiques </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Définition à la ligne <a class="el" href="_couverture_8cpp_source.html#l00119">119</a> du fichier <a class="el" href="_couverture_8cpp_source.html">Couverture.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;{</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    std::vector&lt;Ville&gt; v;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <a class="code" href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">m_graphe</a>.getPointsArticulation(v);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordflow">return</span> v;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;}</div>
<div class="ttc" id="classtp2_1_1_couverture_html_a6a620a08b2a810862999c0059c87408e"><div class="ttname"><a href="classtp2_1_1_couverture.html#a6a620a08b2a810862999c0059c87408e">tp2::Couverture::m_graphe</a></div><div class="ttdeci">Graphe&lt; Ville &gt; m_graphe</div><div class="ttdef"><b>Definition:</b> <a href="_couverture_8h_source.html#l00051">Couverture.h:51</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Documentation des données membres</h2>
<a class="anchor" id="a6a620a08b2a810862999c0059c87408e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classtp2_1_1_graphe.html">Graphe</a>&lt;<a class="el" href="classtp2_1_1_ville.html">Ville</a>&gt; tp2::Couverture::m_graphe</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Définition à la ligne <a class="el" href="_couverture_8h_source.html#l00051">51</a> du fichier <a class="el" href="_couverture_8h_source.html">Couverture.h</a>.</p>

</div>
</div>
<hr/>La documentation de cette classe a été générée à partir des fichiers suivants :<ul>
<li><a class="el" href="_couverture_8h_source.html">Couverture.h</a></li>
<li><a class="el" href="_couverture_8cpp_source.html">Couverture.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Généré le Jeudi Novembre 7 2013 16:27:17 pour Graphes  - Algorithmes de parcours  - par &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
